package com.freewater.parking.infrastructure.db;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface SummaryDao extends JpaRepository<SummaryTable, Integer> {

    @Query("update SummaryTable t set t.totalInParking = t.totalInParking + :increment where t.id = :id")
    @Modifying
    void updateParkingCountById(Integer id, Integer increment);
}
